//
//  PlayModel.h
//  GC_OC
//
//  Created by 曾霄逸 on 2022/3/6.
//

#import <Foundation/Foundation.h>
#import "CurriculumModel.h"
NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    PlayStyleSequence = 0, //顺序播放
    PlayStyleSingle = 1,   //单曲循环播放
    PlayStyleRandom = 2,   //随机播放
} PlayStyle;

@interface PlayModel : NSObject
//标题
@property (nonatomic, strong, readonly) NSString * titleStr;

/**播放列表*/
@property (nonatomic, strong, readonly) NSMutableArray <CurriculumModel *> * listArr;

@property (nonatomic, assign, readonly) NSInteger currentIndex;

@property (nonatomic, strong, readonly) CurriculumModel *currentModel;

@property (nonatomic, assign) PlayStyle playStyle;

+ (instancetype)sharedModel;

- (void)play:(CurriculumModel *)model listArr:(NSArray<CurriculumModel *> *)listArr viewPlayY:(CGFloat)playY;

//播放下一首
- (void)playNextSong;
//播放上一首
- (void)playLastSong;
- (void)changePlayStyle;
- (void)changeIndex:(NSInteger)index;

@end

NS_ASSUME_NONNULL_END
